<!--
 * @Author: sbotlp
 * @Email: sbotlp@sina.com
 * @Date: 2019-11-21 21:52:35
 * @LastEditTime: 2019-11-21 22:03:47
 * @Description: http://www.sbotlp.com.cn
 -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
</head>
<body>
  jq-todo-list
  <br/>
  <input type="text" id='txt-title'> 
  <button id='btn-submit'>submit</button> 
  <ul id="ul-list"></ul>
  <script>
    var $txtTitle = $('#txt-title');
    var $btnSubmit = $('#btn-submit');
    var $ul = $('#ul-list');
    $btnSubmit.click(function(){
      var title = $txtTitle.val();
      if (title) {
        var $li = $('<li>'+ title +'</li>');
        $ul.append($li);
        $txtTitle.val('');
      }
    });
  </script>
</body>
</html>